import requests, pprint

url = 'http://localhost/api/mgr/medicines'
params = {
    'action': 'list_medicine',
}
headers = {
    'Cookie': '__guid=96992031.1054226641019815200.1610883211798.1155; csrftoken=bhqMhToKnqaynYvTtfxJdSYahNLmB9tgezbeN7oMjko96rpr1lZ8UDY308oWl2Ba; sessionid=a09sorft5mo4o8l8al2ptansfdw6zlis; monitor_count=8'
}

res = requests.get(url, params=params, headers=headers)
pprint.pprint(res.json(), sort_dicts=0)